package com.chenxi.service.impl;

import com.chenxi.mapper.SysRoleMapper;
import com.chenxi.model.SysRole;
import com.chenxi.service.ISysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("sysRoleService")
public class SysRoleServiceimpl implements ISysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    @Cacheable(value = "oauthCache")
    public List<SysRole> getRoleListByUserId(Long userId) {
        return sysRoleMapper.getRoleListByUserId(userId);
    }
}
